const { app,ipcMain } = require('electron');
const fs=require("fs");
const {readdir}=require("fs/promises");
const path=require("path")
ipcMain.handle('on-getFiles-event', async(e, msg) => {
    const pathBase = app.isPackaged?"../../dist/uploads":"../../public/uploads"; // 本地启动的vue项目路径
    const pathUrl=path.resolve(__dirname,pathBase)
    // const files=await fs.readdirSync(pathUrl);
    const files=await readdir(pathUrl);
    return files
})